#pragma once
#include "HashTable.h"
namespace jib
{ 
	template<class K>
	class unorderedset
	{
		struct SetKeyOfT
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};
	public:
		typedef typename Hash_Bucket::Hash_Bucket<K ,K,SetKeyOfT>::const_iterator const_iterator;
		typedef typename Hash_Bucket::Hash_Bucket<K, K, SetKeyOfT>::const_iterator iterator;
		const_iterator begin() const
		{
			return _hb.begin();
		}
		const_iterator end() const
		{
			return _hb.end();
		}
		pair<const_iterator,bool> Insert(const K& key)
		{
			//return _hb.Insert(key);
			pair<typename Hash_Bucket::Hash_Bucket<K, K, SetKeyOfT>::iterator, bool> ret = _hb.Insert(key);
			return pair<const_iterator, bool>(ret.first, ret.second);
		}
		Hash_Bucket::Hash_Bucket<K, K, SetKeyOfT> _hb;
	};
	
}